import request from "@/apps/admin/utils/request";
import {postJson} from "@/apps/admin/utils/request";
// 房间 API 基础 URL
const BASE_URL = '/v1/admin';

export function updateRoom(data) {
    return postJson(`${BASE_URL}/updateRoom`, data);
}

// 删除房间
export function deleteRoomApi(data: object) {
    return postJson(`${BASE_URL}/deleteRoom`, data);
}


// 获取房间列表
export const getRooms = (params = {}) => {
    return request.get(`${BASE_URL}/getRooms`, { params });
}


// 创建房间
export const createRoom = (roomData) => {
    return request.post(`${BASE_URL}/createRoom`, roomData);
}


